<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title></title>
    <link rel="stylesheet" href="./css/base.css"/>
    <link rel="stylesheet" href="./css/my-answers.css"/>
</head>
<body>
<div class="warp">
    <header class="clearfix">
        <a href="#" class="back fl" onclick="backfirst()"></a>
        我的问答
    </header>
    <div class="main">
        <div class="combo">

            <div class="combo_bottom clearfix">
                <div class="pic fl">
                    <a href="#"></a>
                </div>
                <div class="right">
                    <div class="top clearfix">
                        <h3 class="fl">小艾同学</h3>
                        <span class="fr">2018-04-01</span>
                    </div>
                    <div class="text">湿疹宝宝饮食要注意点什么?</div>

                </div>
            </div>
            <div class="questions_box">
                <div class="questions_in">
                    <div class="questions_top clearfix">
                        <div class="left fl">
                            <span class="user">李玲</span>
                            <span class="yuesao">月嫂</span>
                        </div>
                        <div class="time fr">2018-04-01</div>
                    </div>
                    <div class="text">你需要先了解一下湿疹形成的根源。湿疹的根源是胃肠道系统的不完善，某些过敏性体质的小儿吃进去的过敏原易透过较薄的肠壁进入血液中，由于皮下毛细血管最丰富，所以湿疹就立刻表现在皮肤上。</div>
                </div>
            </div>

        </div>
    </div>
    <div class="tishi">
        <img src="./images/drawable-xhdpi/icon_1-01.png" alt=""/>
        暂无问答
    </div>
</div>
</body>
<script src="./js/base.js"></script>
<script src="./js/jquery-1.12.4.js"></script>
<script src="./js/jquery.cookie.js"></script>
<script type="text/javascript">
$(function(){
	var html="";
	$(".combo").empty();
	 var data={sessionid:sessionStorage["sessionId"],"page":"1","pageSize":"100","scope":0};
    $.post(baseURL+'yuesao/question/mylist',data,function (result) {
        console.log(result);
        var pic = result.data.list.picUrl;
    	$.each(result.data.list,function(n,t){
        html+='<div class="combo_bottom clearfix">';
        html+=' <div class="pic fl" style="background: url('+baseURL2+pic+')">';
        html+='  <a href="#"></a>';
        html+='   </div>';
        html+=' <div class="right">';
        html+='    <div class="top clearfix">';
        html+='    <h3 id="'+t.id+'" class="fl">'+t.userName+'</h3>';
        html+='   <span   class="fr">'+t.questionDate.substr(0,19)+'</span>';
        html+='     </div>';
        html+='      <div id="question" class="text">'+t.question+'?</div>';
        html+='  </div>';
        html+=' </div> ';
        if(!t.answer==""){
	        html+=' <div class="questions_box">';
	        html+='<div class="questions_in">';
	   		html+='<div class="questions_top clearfix">';
			html+='          <div class="left fl">';
			html+='              <span class="user">'+t.name+'</span>';
			html+='                <span class="yuesao">'+t.roleName+'</span>';
			html+='          </div>';
			html+='                   <div  class="time fr">'+t.answerDate+'</div>';
			html+='                </div>';
			html+='        <div class="text">'+t.answer+'</div>';
			html+='</div></div>';
        }
    	});
    	$(".combo").empty().append(html);
    	if(result.code=="USR108"){
    	    $('.tishi').show();
        }
    });


})
    function backfirst(){
        window.history.back();
    }
</script>
</html>